<?php include atemplate("header");?>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td align="center" bgcolor="#969696"><strong>公 告 管 理</strong></td>
  </tr>
</table>
<form action="./index.php?do=comment&job=list" method="POST">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="40" align="right">
	作品名称：
	<input type="text" name="title" id="title" value='<?php echo $title;?>'/>
	作者：
	<input type="text" name="author" id="author" value='<?php echo $author;?>'/>
	评论内容：
	<input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>'/>
	<input type="submit" value='查询'/>
	</td>
  </tr>
</table>
</form>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
 <tr bgcolor="#969696">
    <td width="40" align="center" valign="middle" class="STYLE7">ID</td>
    <td height="30" align="center" >评论内容</td>
    <td height="30" align="center" >评论时间</td>
    <td height="30" align="center" >作品</td>
    <td width="60" align="center" valign="middle" colspan="2" >操作</td>
 </tr>
 <?php foreach ($list as $key=>$val) {
	$key %2 == 0 ? $bgcolor = 'bgcolor="#FAFAFA"' : $bgcolor = 'bgcolor="#FFFFF7"';
 ?>
  <tr <?php echo $bgcolor;?>>
	<td width="40" align="center" valign="middle" class="STYLE7"><?php echo $val['id'];?></td>
    <td height="30" align="center" ><?php echo $val['content'];?></td>
    <td height="30" align="center" ><?php echo date('Y-m-d H:i:s',$val['createtime']);?></td>
	<td height="30" align="center" >
	<a href="../photo.php?id=<?php echo $val['imageid'];?>" target='_blank'/><?php echo $val['title'];?></a></td>
    <td width="60" align="center" valign="middle" >
	<a href="index.php?do=comment&job=delete&id=<?php echo $val['id'];?>" onclick="return  confirm('是否真的删除此评论');">删除</a></td>
    <td width="80" height="40" align="center" valign="middle" >
	<?php if($val['ifhide']==0){ ?>
	<a href="index.php?do=comment&job=hide&id=<?php echo $val['id'];?>" onclick="return  confirm('是否真的屏蔽此评论');">屏蔽</a>
	<?php }else{ ?>
	<a href="index.php?do=comment&job=canclehide&id=<?php echo $val['id'];?>" onclick="return  confirm('是否真的解除屏蔽此评论');">解除屏蔽</a>
	<?php } ?>
	</td>
  </tr>
 <?php }?>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td align="center" class="page"><?php echo $pagetag;?></td>
  </tr>
</table>
<?php include atemplate("footer");?>